package com.xdf.whiteaccount.enums;

public enum ScanQrCategory {
    ONE("单匹"), SHELVES("货架号");
    private String value;

    public String getValue() {
        return value;
    }

    ScanQrCategory(String value) {
        this.value = value;
    }

    /**
     * 根据值匹配
     *
     * @param value
     * @return
     */
    public static ScanQrCategory match(String value) {
        if (value == null || value.trim().length() <= 0) return null;
        for (ScanQrCategory e : values()) {
            if (e.getValue().equals(value)) return e;
        }
        return null;
    }
}
